<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnInStepCategoryIdsTable extends AbstractMigration
{
    public function up()
    {

        $this->table('project_member')
            ->addColumn('step_category_ids', 'string', ['default' => '', 'limit' => 255, 'comment' => 'step_category_ids分类ids'])
            ->addColumn('type', 'enum', ['values' => 'manage,production', 'default' => 'production', 'comment' => '成员类型:管理组,生产组'])
            ->addColumn('role_id', 'integer', ['signed' => false, 'default' => 0, 'limit' => 11, 'comment' => '角色ID'])
            ->save();
    }

    public function down()
    {
        $this->table('project_member')
            ->removeColumn('step_category_ids')
            ->removeColumn('type')
            ->removeColumn('role_id')
            ->save();
    }
}
